package top.lishuoboy.hutool.core.io;

import cn.hutool.core.io.FileUtil;

import java.util.List;

public class BatchRename {
    private static String basePath = "D:\\qycache\\download\\奇奇和悦悦的玩具\\";

    public static void main(String[] args) {
        List<String> list = FileUtil.listFileNames(basePath);
        System.out.println(list);

        for (int i = 0; i < list.size(); i++) {
            String oldName = list.get(i);
            oldName = basePath + oldName;
            FileUtil.rename(FileUtil.file(oldName), oldName.replace("qsv", "mp4"), true);
        }

    }
}
